package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.Housekeeping;
import com.ruoyi.recycle.mapper.HousekeepingMapper;
import com.ruoyi.recycle.service.IHousekeepingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 家政服务Service业务层处理
 *
 * @author Wubk
 * @date 2022-05-22
 */
@Service
public class HousekeepingServiceImpl extends ServiceImpl<HousekeepingMapper, Housekeeping> implements IHousekeepingService {
    @Autowired
    private HousekeepingMapper housekeepingMapper;

    /**
     * 查询家政服务
     *
     * @param id 家政服务主键
     * @return 家政服务
     */
    @Override
    public Housekeeping selectHousekeepingById(Long id) {
        return housekeepingMapper.selectHousekeepingById(id);
    }

    /**
     * 查询家政服务列表
     *
     * @param housekeeping 家政服务
     * @return 家政服务
     */
    @Override
    public List<Housekeeping> selectHousekeepingList(Housekeeping housekeeping) {
        return housekeepingMapper.selectHousekeepingList(housekeeping);
    }

    /**
     * 新增家政服务
     *
     * @param housekeeping 家政服务
     * @return 结果
     */
    @Override
    public int insertHousekeeping(Housekeeping housekeeping) {
        return housekeepingMapper.insertHousekeeping(housekeeping);
    }

    /**
     * 修改家政服务
     *
     * @param housekeeping 家政服务
     * @return 结果
     */
    @Override
    public int updateHousekeeping(Housekeeping housekeeping) {
        return housekeepingMapper.updateHousekeeping(housekeeping);
    }

    /**
     * 批量删除家政服务
     *
     * @param ids 需要删除的家政服务主键
     * @return 结果
     */
    @Override
    public int deleteHousekeepingByIds(Long[] ids) {
        return housekeepingMapper.deleteHousekeepingByIds(ids);
    }

    /**
     * 删除家政服务信息
     *
     * @param id 家政服务主键
     * @return 结果
     */
    @Override
    public int deleteHousekeepingById(Long id) {
        return housekeepingMapper.deleteHousekeepingById(id);
    }
}
